<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>bootstrap Demo</title>
    <link rel="stylesheet" href="./styles/bootstrap.min.css">
    <link rel="stylesheet" href="./styles/font-awesome.min.css">
    <link rel="stylesheet" href="./styles/ahoutInstitution.css">
    <link rel="stylesheet" href="./styles/bootstrap-datetimepicker.min.css">
</head>

<body>
<!-- 导航go -->
<div class="all_nav navbar navbar-default navbar-fixed-top" id="navbar" role="navigation">
    <div class="container">
        <div class="col-md-2">
            <a href="javascript: void(0);">HeiKiz</a>
        </div>
        <div class="col-md-8">
            <ul class="nav_show nav navbar-nav">
                <li>
                    <a href="./index.html">首页</a>
                </li>
                <li>
                    <a href="./servar_aboutServer.html">服务商管理</a>
                </li>
                <li>
                    <a class="nav_choose" href="./institution_aboutInstitution.html">机构管理</a>
                </li>
                <li>
                    <a href="./teacher_teacherIndex.html">师训管理</a>
                </li>
                <li>
                    <a href="./order_orderManagement.html">订单管理</a>
                </li>
                <li>
                    <a href="./data_statisticalData.html">数据统计</a>
                </li>
            </ul>
        </div>
        <div class="use_info col-md-2">
            <a href="javascript: void(0);" id="dropdownMenu1" data-toggle="dropdown">
                <img class="user_img" src="./images/timg.jpg">
                <p class="user_name">开心麻花</p>
                <span class="caret"></span>
            </a>
            <ul id="dropdown_menu" class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                <li role="presentation">
                    <a id="id1" role="menuitem" tabindex="-1" href="javascript: void(0);">保存密码</a>
                </li>
                <li role="presentation">
                    <a id="id2" role="menuitem" tabindex="-1" href="javascript: void(0);">退出账号</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 导航 end -->

<!-- 数据概览 -->
<div class="list_main container">
    <div class="clearfix">
        <!-- 区域选择 -->
        <div class="all_choose pull-left">
            <form class="form-inline">
                <div data-toggle="distpicker">
                    <div class="position form-group pull-left">
                        <label class="sr-only" for="choose_province">Province</label>
                        <select class="form-control" id="choose_province"></select>
                    </div>
                    <div class="position form-group pull-left">
                        <label class="sr-only" for="choose_city">City</label>
                        <select class="form-control" id="choose_city"></select>
                    </div>
                </div>
            </form>
        </div>
        <!-- 下拉选择 -->
        <form  class="form-inline pull-left">
            <div class="form-group">
                <select class="form-control">
                    <option>选择购买方案</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>
            </div>
        </form>
        <!-- 搜索框 -->
        <div class="form-group col-md-3">
            <input id="search_serverList" type="text" class="form-control" id="" placeholder="输入名称或手机号进行搜索">
        </div>
        <div class="add_server pull-right" data-toggle="modal" data-target="#myAdd">添加服务商</div>
    </div>
</div>

<!-- 服务商 -->
<div class="no_shipped_wrap container">
    <div class="row">
        <!-- table 部分 -->
        <div class="table_body" id="table_body">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th class="col-md-1">机构名称</th>
                    <th class="col-md-1">服务商</th>
                    <th class="col-md-1">联系电话</th>
                    <th class="col-md-1">老师</th>
                    <th class="col-md-1">学生</th>
                    <th class="col-md-1">方案</th>
                    <th class="col-md-1">到期时间</th>
                    <th class="col-md-2">操作</th>
                </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>HeiPis</td>
                        <td>黑皮书</td>
                        <td>13872635425</td>
                        <td>4</td>
                        <td>4</td>
                        <td>单店版</td>
                        <td>2018-08-09</td>
                        <td class="table_operation">
                            <a class="goDetail" href="javascript: void(0);">查看详情</a>
                            <a class="institutionPass " href="javascript: void(0);">审核通过</a>
                            <a class="institutionChange" style="display: none;" href="javascript: void(0);">更换服务商</a>
                        </td>
                    </tr>
                    <tr>
                        <td>HeiPis</td>
                        <td>黑皮书</td>
                        <td>13872635425</td>
                        <td>4</td>
                        <td>4</td>
                        <td>单店版</td>
                        <td>2018-08-09</td>
                        <td class="table_operation">
                            <a class="goDetail" href="javascript: void(0);">查看详情</a>
                            <a class="institutionPass" style="display: none;" href="javascript: void(0);">审核通过</a>
                            <a class="institutionChange" style="display: none;" href="javascript: void(0);">更换服务商</a>
                        </td>
                    </tr>
                    <tr>
                        <td>HeiPis</td>
                        <td>黑皮书</td>
                        <td>13872635425</td>
                        <td>4</td>
                        <td>4</td>
                        <td>单店版</td>
                        <td>2018-08-09</td>
                        <td class="table_operation">
                            <a class="goDetail" href="javascript: void(0);">查看详情</a>
                            <a class="institutionPass" style="display: none;" href="javascript: void(0);">审核通过</a>
                            <a class="institutionChange" href="javascript: void(0);">更换服务商</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 添加内容 modal-->
<div class="add_modal modal fade" id="myAdd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">添加服务商</h4>
            </div>
            <div class="modal-body">
                <!--  select -->
                <div class="server_list server_number clearfix">
                    <p class="server_title pull-left col-md-2">服务商:</p>
                    <div class="form-group col-md-10">
                        <select class="form_seclect form-control" id="add_server_select">
                            <option value="">as5</option>
                            <option value="">as3</option>
                            <option value="">as2</option>
                        </select>
                    </div>
                </div>
                <div class="server_list server_number clearfix">
                    <p class="server_title pull-left col-md-2">编号:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="number_val" placeholder="输入合同编号">
                    </div>

                </div>
                <div class="server_list server_name clearfix">
                    <p class="server_title pull-left col-md-2">名字:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="name_val" placeholder="输入服务商名称">
                    </div>

                </div>
                <div class="server_list server_city clearfix">
                    <p class="server_title pull-left col-md-2">城市:</p>
                    <form class="form-inline col-md-10">
                        <div data-toggle="distpicker">
                            <div class="server_position position form-group pull-left">
                                <label class="sr-only" for="add_province">Province</label>
                                <select class="form_seclect form-control" id="add_province"></select>
                            </div>
                            <div class="server_position position form-group pull-left">
                                <label class="sr-only" for="add_city">City</label>
                                <select class="form_seclect form-control" id="add_city"></select>
                            </div>
                            <div class="server_position position form-group pull-left">
                                <label class="sr-only" for="add_district">District</label>
                                <select class="form_seclect form-control" id="add_district"></select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="server_list server_contacts clearfix">
                    <p class="server_title pull-left col-md-2">联系人:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="contacts_val" placeholder="输入联系人姓名">
                    </div>
                </div>
                <div class="server_list server_linkNumber clearfix">
                    <p class="server_title pull-left col-md-2">联系电话:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="linkNumber_val" placeholder="输入联系人电话">
                    </div>
                </div>
                <div class="server_list server_address clearfix">
                    <p class="server_title pull-left col-md-2">联系地址:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="address_val" placeholder="输入联系人地址">
                    </div>
                </div>
                <!-- 方案 -->
                <div class="server_list server_number clearfix">
                    <p class="server_title pull-left col-md-2">价格方案:</p>
                    <div class="form-group col-md-10">
                        <select class="form_seclect form-control" id="about_price">
                            <option value="">价格方案</option>
                            <option value="">as3</option>
                            <option value="">as2</option>
                        </select>
                    </div>
                </div>
                <div class="server_list server_timeValidity clearfix">
                    <p class="server_title pull-left col-md-2">签约时间:</p>
                    <div class="server_timeValidity_list form-group col-md-10">
                        <!-- 能用的到的时间 -->
                        <div class="time_group input-append date form-group pull-left" id="validityTime" data-date="2012-12-24" data-date-format="dd-mm-yyyy">
                            <input size="16" type="text" class="form-control" value="2012-12-24" readonly>
                            <span class="time_icon add-on">
                                    <i class="icon-sort"></i>
                                </span>
                        </div>
                    </div>
                </div>
                <div class="server_list server_account clearfix">
                    <p class="server_title pull-left col-md-2">登录账号:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="account_val" placeholder="输入登录账号">
                    </div>
                </div>
                <div class="server_list server_password clearfix">
                    <p class="server_title pull-left col-md-2">登录密码:</p>
                    <div class="form-group col-md-10">
                        <input type="text" class="form-control" id="password_val" placeholder="输入登录密码">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" id="btn_cancel" class="btn_cancel btn btn-default pull-left" data-dismiss="modal">取消</button>
                <button type="button" id="btn_save" class="btn_save btn btn-primary pull-right" data-dismiss="modal">保存</button>
            </div>
        </div>
    </div>
</div>


<script src="./javascripts/jquery-1.9.1.min.js"></script>
<script src="./javascripts/bootstrap.min.js"></script>
<script src="./javascripts/distpicker.data.min.js"></script>
<script src="./javascripts/distpicker.min.js"></script>
<script src="./javascripts/bootstrap-datetimepicker.min.js"></script>
<script src="./javascripts/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript">
    $(function () {
        // 导航选项 点击
        $(".nav_show>li a").click(function () {
            console.log($(this).index());
            $(this).addClass('nav_choose')
                .parent("li").siblings().find("a")
                .removeClass('nav_choose');
        })
        // try
        $("#id1").click(function () {
            console.log("id1---")
        })
        $("#id2").click(function () {
            console.log("id1--111-")
        })
        // title 定义省份
        var $chooseProvince  = $("#choose_province");
        var $chooseCity  = $("#choose_city");
        // 定义要穿入的省市
        var $provincing = null;
        var $citing = null;
        $provincing = $chooseProvince.val();
        $citing = $chooseCity.val();
        console.log("省份--", $provincing,"市区", $citing );

        // 省份改变
        $chooseProvince.change(function(){
            $provincing = $chooseProvince.val();
            $citing = $chooseCity.val();
            console.log("省份--", $provincing,"市区", $citing );
        })

        // 市区改变
        $chooseCity.change(function(){
            $provincing = $chooseProvince.val();
            $citing = $chooseCity.val();
            console.log("省份--", $provincing,"市区", $citing );
        })

        // validityTime 时间
        $("#validityTime").datetimepicker({
            format: "yyyy-mm-dd",
            language: "zh-CN",
            weekStart: 1,
            minView: "month",//设置只显示到月份
            autoclose:true,//选中关闭
        });

        // 保存 添加服务商
        $("#btn_save").click(function(){
            console.log("save...")
        })
        // 取消 添加服务商
        $("#btn_cancel").click(function(){
            console.log("cancel...")
        })
        // 隐藏 添加服务商模态框
        $('#myAdd').on('hide.bs.modal', function () {
            console.log("hide")
        })

        // 查看详情
        $("#table_body").on("click", ".goDetail", function(){
            window.location.href= "./institution_aboutInstitutionDetail.html"
        })

    })
</script>
</body>

</html>